/**
 * Generate time : 2012-01-10 15:16:24
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEReasonMethod table comment : 原因解决对应
 */
public class ZMCEReasonMethod extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdFaultreasonId = " "; /* 故障原因ID */
	private String fdSystemdataId = " "; /* 解决办法ID */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultreasonId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("故障原因ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSystemdataId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("解决办法ID");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEReasonMethod() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdFaultreasonId - 故障原因ID
	 * 
	 * @return the fdFaultreasonId
	 */
	public String getFdFaultreasonId() {
		return this.fdFaultreasonId;
	}

	/**
	 * set the fdFaultreasonId - 故障原因ID
	 */
	public void setFdFaultreasonId(String fdFaultreasonId) {
		this.fdFaultreasonId = fdFaultreasonId;
	}

	/**
	 * get the fdSystemdataId - 解决办法ID
	 * 
	 * @return the fdSystemdataId
	 */
	public String getFdSystemdataId() {
		return this.fdSystemdataId;
	}

	/**
	 * set the fdSystemdataId - 解决办法ID
	 */
	public void setFdSystemdataId(String fdSystemdataId) {
		this.fdSystemdataId = fdSystemdataId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdFaultreasonId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultreasonId")), fdFaultreasonId));
		setFdSystemdataId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSystemdataId")), fdSystemdataId));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdFaultreasonId", StringUtils.toString(fdFaultreasonId, eiMetadata.getMeta("fdFaultreasonId")));
		map.put("fdSystemdataId", StringUtils.toString(fdSystemdataId, eiMetadata.getMeta("fdSystemdataId")));

		return map;

	}
}